package edu.ctbu.ctbujsj.controller;

import edu.ctbu.ctbujsj.domain.Student;
import edu.ctbu.ctbujsj.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StudentController {
    @Autowired
    private StudentService studentService;
    @RequestMapping("/findall")
    public List<Student> findAll(){
        return studentService.findAll();
    }
}
